package com.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 评价表实体类
 */
@Getter
@Setter
@NoArgsConstructor
@TableName("tb_evaluate")
public class Evaluate implements Serializable {
    @TableId(type = IdType.AUTO)
    private Integer id;//自动编号
    @TableField("user_id")
    private Integer userId;//用户编号
    @TableField("course_id")
    private Integer courseId;//所属课程
    @TableField("content")
    private String content;//评价内容
    @TableField("star_count")
    private double starCount;//星级
    @TableField("create_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",locale = "zh",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDate;//创建时间
}
